package com.ruoyi.audit.service.impl;

import java.util.List;

import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.audit.mapper.AuditMapper;
import com.ruoyi.audit.domain.Audit;
import com.ruoyi.audit.service.IAuditService;

/**
 * 财务审核Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-05-12
 */
@Service
public class AuditServiceImpl implements IAuditService
{
    @Autowired
    private AuditMapper auditMapper;

    /**
     * 查询财务审核
     * 
     * @param id 财务审核主键
     * @return 财务审核
     */
    @Override
    public Audit selectAuditById(Long id)
    {
        return auditMapper.selectAuditById(id);
    }

    /**
     * 查询财务审核列表
     * 
     * @param audit 财务审核
     * @return 财务审核
     */
    @Override
    public List<Audit> selectAuditList(Audit audit)
    {
        return auditMapper.selectAuditList(audit);
    }

    /**
     * 新增财务审核
     * 
     * @param audit 财务审核
     * @return 结果
     */
    @Override
    public int insertAudit(Audit audit)
    {
        return auditMapper.insertAudit(audit);
    }

    /**
     * 修改财务审核
     * 
     * @param audit 财务审核
     * @return 结果
     */
    @Override
    public int updateAudit(Audit audit)
    {
        return auditMapper.updateAudit(audit);
    }

    /**
     * 批量删除财务审核
     * 
     * @param ids 需要删除的财务审核主键
     * @return 结果
     */
    @Override
    public int deleteAuditByIds(Long[] ids)
    {
        return auditMapper.deleteAuditByIds(ids);
    }

    /**
     * 删除财务审核信息
     * 
     * @param id 财务审核主键
     * @return 结果
     */
    @Override
    public int deleteAuditById(Long id)
    {
        return auditMapper.deleteAuditById(id);
    }



    /**
     * 财务拒绝
     * @param
     * @return
     */
    @Override
    public void updateWithdrawStatus(Long id) {

        auditMapper.updateWithdrawStatus(id);
    }

    /**
     * 审核并转账
     * @param id
     */
    @Override
    public void LookWithdrawStatus(Long id) {
        auditMapper.LookWithdrawStatus(id);
    }
}
